package com.eastfair.venuebooking.service;

import com.eastfair.boot.service.SuperService;
import com.eastfair.venuebooking.entity.ExhibitionBusinessOpportunity;

import java.util.List;

import com.eastfair.venuebooking.vo.*;
import com.eastfair.venuebooking.dto.*;

/**
 * <p>
 * 业务接口
 * 展会商机关系
 * </p>
 *
 * @author linan
 * @date 2023-04-03
 */
public interface ExhibitionBusinessOpportunityService extends SuperService<ExhibitionBusinessOpportunity> {
    /**
     * do转vo
     *
     * @param model
     */
    ExhibitionBusinessOpportunityVO doToVo(ExhibitionBusinessOpportunity model);

    /**
     * do转vo
     *
     * @param modelList
     */
    List<ExhibitionBusinessOpportunityVO> doToVos(List<ExhibitionBusinessOpportunity> modelList);


    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<ExhibitionBusinessOpportunity> list(ExhibitionBusinessOpportunityDTO modelDTO, List<Long> ids);

    /**
     * 通用查询
     *
     * @param modelDTO DTO
     * @param ids      主键id集合
     * @return list
     */
    List<ExhibitionBusinessOpportunity> listOfCache(ExhibitionBusinessOpportunityDTO modelDTO, List<Long> ids);

    /**
     * 查询商机id集合
     * @param id id
     * @return List<Long>
     */
    List<Long> queryBusinessOpportunityIds(Long id);

    /**
     * 商机ID获取展会商机关系.
     *
     * @param businessOpportunityId the business opportunity id
     * @return the by business opportunity id
     */
    ExhibitionBusinessOpportunity getByBusinessOpportunityId(Long businessOpportunityId);

    /**
     * 是否存在展会
     * @param businessOpportunityIds businessOpportunityIds
     * @param id
     * @return boolean
     */
    boolean existExhibition(List<Long> businessOpportunityIds, Long id);

    /**
     * 通过展会删除商机
     * @param exhibitionId
     */
    void removeByExhibitionId(Long exhibitionId);
}
